namespace local = ""
namespace ns1 = "http://eric.van-der-vlist.com/ns/person"
default namespace ns2 = "http://eric.van-der-vlist.com/ns/library"

start =
  ((element1 | element2) | element3)
  | element4
element1 = element library { element2+ }
element2 =
  element book {
    (((((attribute id { text },
         attribute available { ("true" | xsd:token " false ") | "" }),
        element5),
       element6),
      (empty | element3+)),
     (empty | element4+))
    & ((empty
        | attribute * - ((local:* | ns2:*) | ns1:*) { text }+)
       | (empty | element7+))+
  }
element3 =
  element ns1:author {
    ((attribute id {
        xsd:NMTOKEN { maxLength = " 16 " }
      },
      element8),
     element9),
    (empty | element10)
  }
element4 =
  element character {
    ((attribute id { text },
      element8),
     element9),
    element11
  }
element5 =
  element isbn {
    (empty
     | attribute * - ((local:* | ns2:*) | ns1:*) { text }+),
    token
  }
element6 =
  element title {
    (empty
     | attribute * - ((local:* | ns2:*) | ns1:*) { text }+),
    text
  }
element7 =
  element * - ((local:* | ns2:*) | ns1:*) {
    ((element12
      | attribute * { text })
     | text)+
  }
element8 = element ns1:name { xsd:token }
element9 = element ns1:born { xsd:date }
element10 = element ns1:dead { xsd:date }
element11 = element qualification { text }
element12 =
  element * {
    ((element12
      | attribute * { text })
     | text)+
  }
